<?php
if($actPost=="insertcontact")
{
    $fullname       = gpc_getStringPost("tfullname");
    $email          = gpc_getStringPost("temail");
    $subject        = gpc_getStringPost("tsubject");
    $tmessage       = gpc_getStringPost("tmessage");
    $SendEmail      = gpc_getBoolPost("cSendEmail");
    $spamcode       = gpc_getStringPost("tspamcode");
    
    require("includes/php-captcha.inc.php");
	if (PhpCaptcha::Validate($spamcode)==false)
	{
	   $msg    = 'Please enter the correct security code!';
    }
    else
    {
        $subject    = "feedback from ".$email;
        $message    = "email feedback from: <br>";
        $message   .= "Name: ".$fullname."<br>";
        $message   .= "Email: ".$email."<br>";
        $message   .= "Subject: ".$subject."<br>";
        $message   .= "Msg: ".$tmessage."<br>";
        $message   .= "IP: ".$ip."<br>";
        
        send_email($email_admin,"",$subject,$message);
        $msg    =  'Send feedback succcess!';
        $sendmail   = true;
    }    
}
?>